import request from '@/router/axios';
// 获取列表
export const getList = (current, size, params) => {
  return request({
    url: '/api/blade-sale/outsourcing/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

// 详情
export const detail = (id) => {
  return request({
    url: '/api/blade-sale/outsourcing/detail',
    method: 'get',
    params: {
      id
    }
  })
}

// 保存
export const save = (data, ids) => {
  return request({
    url: '/api/blade-sale/outsourcing/save',
    method: 'post',
    data: data,
    params: {
      ids
    }
  })
}

// 修改
export const update = (data, ids) => {
  return request({
    url: '/api/blade-sale/outsourcing/update',
    method: 'post',
    data: data,
    params: {
      ids
    }
  })
}

//批量删除
export const remove = (ids) => {
  return request({
    url: '/api/blade-sale/outsourcing/remove',
    method: 'post',
    params: {
      ids
    }
  })
}

//获取规格名称
export const getSpecificationsList = () => {
  return request({
    url: '/api/blade-sale/outsourcingstandards/list',
    method: 'get',
    params: {
    }
  })
}

//获取工艺名称
export const getTechnologyList = () => {
  return request({
    url: '/api/blade-sale/outsourcingprocess/list',
    method: 'get',
    params: {
    }
  })
}

//获取外协外购成本list数据
export const getOutsourcingList = (outsourcingContent, specifications) => {
  return request({
    url: '/api/blade-sale/outsourcing/list',
    method: 'get',
    params: {
      outsourcingContent, specifications
    }
  })
}
